package xyz.xtt.user.api.enums;

public enum UserFundRecordChangeStatus {
    PAID(0, "已支付"),
    UN_SETTLE(1, "待结算"),
    SETTLE_COMPLETE(2, "已结算"),
    REFUND_COMPLETE(3, "已退款"),
    WITHDRAWING(4, "提现中"),
    WITHDRAW_COMPLETE(5, "已提现"),
    ;
    private final int code;
    private final String description;
    public int getCode() {
        return code;
    }

    UserFundRecordChangeStatus(int code, String description) {
        this.code = code;
        this.description = description;
    }
    public UserFundRecordChangeStatus getByCode(int code) {
        for (UserFundRecordChangeStatus status : UserFundRecordChangeStatus.values()) {
            if (status.getCode() == code) {
                return status;
            }
        }
        return null;
    }
}
